﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display.NeighborUI {
    import flash.display.*;
    import Events.*;
    import org.aswing.*;
    import Classes.*;
    import org.aswing.event.*;
    import Display.aswingui.*;

    public class FriendBarLeftNav extends JPanel {

        protected var m_rotation:int = 180;
        protected var m_direction:int;
        protected var m_end:int = 0;
        protected var btn1:DisplayObject;
        protected var btn1_over:DisplayObject;
        protected var btn4:DisplayObject;
        protected var btn4_over:DisplayObject;
        protected var btnE:DisplayObject;
        protected var btnE_over:DisplayObject;

        public function FriendBarLeftNav(){
            super(new SoftBoxLayout(SoftBoxLayout.Y_AXIS, 3, SoftBoxLayout.TOP));
            this.initClips();
            var _local1:JButton = new JButton();
            ASwingHelper.setEasyBorder(this, 5, 1, 0);
            var _local2:SimpleButton = new SimpleButton(this.btn1, this.btn1_over, this.btn1_over, this.btn1_over);
            _local1.wrapSimpleButton(_local2);
            _local1.addActionListener(this.onStepLeft, 0, true);
            this.append(_local1);
            var _local3:JButton = new JButton();
            var _local4:SimpleButton = new SimpleButton(this.btn4, this.btn4_over, this.btn4_over, this.btn4_over);
            _local3.wrapSimpleButton(_local4);
            _local3.addActionListener(this.onFourStepLeft, 0, true);
            this.append(_local3);
            var _local5:JButton = new JButton();
            var _local6:SimpleButton = new SimpleButton(this.btnE, this.btnE_over, this.btnE_over, this.btnE_over);
            _local5.wrapSimpleButton(_local6);
            _local5.addActionListener(this.onSkipEndLeft, 0, true);
            this.append(_local5);
            ASwingHelper.prepare(this);
        }
        protected function initClips():void{
            this.m_direction = -1;
            this.btn1 = (new EmbeddedArt.hud_cycleBttn_right_1() as DisplayObject);
            this.btn1_over = (new EmbeddedArt.hud_cycleBttn_right_1_down() as DisplayObject);
            this.btn4 = (new EmbeddedArt.hud_cycleBttn_right_2() as DisplayObject);
            this.btn4_over = (new EmbeddedArt.hud_cycleBttn_right_2_down() as DisplayObject);
            this.btnE = (new EmbeddedArt.hud_cycleBttn_right_end() as DisplayObject);
            this.btnE_over = (new EmbeddedArt.hud_cycleBttn_right_end_down() as DisplayObject);
        }
        protected function onStepLeft(_arg1:AWEvent):void{
            _arg1.stopPropagation();
            dispatchEvent(new FriendBarEvent(FriendBarEvent.MOVE, (this.m_direction * FriendBar.SLOT_WIDTH), 1));
        }
        protected function onFourStepLeft(_arg1:AWEvent):void{
            _arg1.stopPropagation();
            dispatchEvent(new FriendBarEvent(FriendBarEvent.MOVE, ((this.m_direction * FriendBar.SLOT_WIDTH) * 8), 4));
        }
        protected function onSkipEndLeft(_arg1:AWEvent):void{
            _arg1.stopPropagation();
            dispatchEvent(new FriendBarEvent(FriendBarEvent.MOVE_END, this.m_end));
        }

    }
}//package Display.NeighborUI 
